<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:h="http://java.sun.com/jsf/html">
<body>
	<ui:composition template="/template.xhtml">

		<ui:define name="right">
		</ui:define>

		<ui:define name="center">
			<h2>Mostra tutti gli esperimenti</h2>

			<p:panel header="Lista degli Esperimenti">
				<h:form id="form">

					<p:dataTable id="exp" var="e"
						value="#{experimentController.experimentList}" rowKey="#{e.id}"
						paginator="true" rows="10"
						emptyMessage="nessun esperimento nel database">

						<p:column headerText="#{bundle.CreateExperimentLabel_name}"
							filterBy="#{e.seriesIid}" filterMatchMode="contains">
							<h:outputText value="#{e.seriesIid}" />
						</p:column>

						<p:column headerText="#{bundle.CreateExperimentTitle_title}"
							filterBy="#{e.title}" filterMatchMode="contains">
							<h:outputText value="#{e.title}" />
						</p:column>

						<p:column headerText="#{bundle.CreateExperimentTitle_type}"
						>
							<h:outputText value="#{e.type}" />
						</p:column>
						<p:column>
							<h:panelGrid columns="3" cellpadding="2">

								<p:commandButton id="bs" title="View Samples" ajax="false"
									image="ui-icon ui-icon-pencil" action="showSamplesExp">
									<f:setPropertyActionListener
										target="#{experimentController.experiment}" value="#{e}" />
								</p:commandButton>
								<p:commandButton action="detail"
									image="ui-icon ui-icon-search" title="Details" ajax="false">
									<f:setPropertyActionListener
										target="#{experimentController.experiment}" value="#{e}" />
								</p:commandButton>
								
							</h:panelGrid>
						</p:column>

					</p:dataTable>

				</h:form>
			</p:panel>

		</ui:define>

	</ui:composition>
</body>
</html>
